import Vue from 'vue'
import VueRouter from 'vue-router'

const Individuation = () => import('../views/individuation/Individuation.vue')
const AllMusicList = () => import('../views/allmusiclist/Allmusiclist.vue')
const MusicListDetail = () => import('../views/list-detail/MusicListDetail.vue')
const Ranklist = () => import('../views/ranklist/Ranklist.vue')
const Mv = () => import('../views/mv/Mv.vue')
const MvDetail = () => import('../views/mv/MvDetail.vue')
const MvAllList = () => import('../views/mv/MvAllList.vue')
Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/individuation' },
  { path: '/individuation', component: Individuation }, // 个性化推荐
  { path: '/allmusiclist', component: AllMusicList }, // 歌单
  { path: '/musiclistdetail/:id/:time', component: MusicListDetail },
  { path: '/ranklist', component: Ranklist }, // 排行榜
  { path: '/mv', component: Mv }, // MV
  { path: '/mvdetail/:id', component: MvDetail }, // 播放MV
  { path: '/mvlist', component: MvAllList }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
